#include <map>
#include <string>

//typedef unsigned int	uint;
//typedef unsigned int	uchar;
#define uchar 		unsigned char
#define uint		unsigned int

void getDatFname(std::map<std::string, std::string> &fns, const char* key, const char* defaultFname, const char* prefix, char* out);

void addZeros(char* str, int zeros);

int chtoi(char c);
void itoa_prefix(int num, char* result, int base);
int atoi_prefix(const char* str);
int atoi_b(const char* nptr, int base);
int atoi_b(const char* nptr, int len, int base);
char* itoa(int value, char* result, int base);

int strToInt(const char *input, int base);
int strToInt(const char *input);
void strToBytes(const char *input, uchar* output, int oneChar, int len);
void strToInts(const char *input, uint* output, int cpi, int len);

void arrToHexStr(uint* arr, char* out, int cpi, int len);
void arrChToHexStr(uchar* arr, char* out, int bpi, bool oneChar, int len);
